package com.club.controller;

import com.club.entity.PageBean;
import com.club.entity.R;
import com.club.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户管理 主要管理查看所属的社团,参加的活动等
 *
 * @author zhangfc
 * @date 2022/12/16 15:13
 */
@Api(tags = "用户管理controller")
@RestController
@RequestMapping("/user")
@RequiredArgsConstructor
public class UserController {

    private final UserService userService;


    /**
     * 分页查询用户列表
     *
     * @param pageBean 分页的bean
     * @return R
     */
    @ApiOperation("分页查询用户")
    @PostMapping("/listUser")
    public R listUser(@RequestBody PageBean pageBean) {
        return userService.listUser(pageBean);
    }

}
